﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Collections;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x02000205 RID: 517
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class ChessRogueCell : IMessage<ChessRogueCell>, IMessage, IEquatable<ChessRogueCell>, IDeepCloneable<ChessRogueCell>, IBufferMessage
	{
		// Token: 0x170006C5 RID: 1733
		// (get) Token: 0x0600173E RID: 5950 RVA: 0x000421BE File Offset: 0x000403BE
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<ChessRogueCell> Parser
		{
			get
			{
				return ChessRogueCell._parser;
			}
		}

		// Token: 0x170006C6 RID: 1734
		// (get) Token: 0x0600173F RID: 5951 RVA: 0x000421C5 File Offset: 0x000403C5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return ChessRogueCellReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x170006C7 RID: 1735
		// (get) Token: 0x06001740 RID: 5952 RVA: 0x000421D7 File Offset: 0x000403D7
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return ChessRogueCell.Descriptor;
			}
		}

		// Token: 0x06001741 RID: 5953 RVA: 0x000421DE File Offset: 0x000403DE
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChessRogueCell()
		{
		}

		// Token: 0x06001742 RID: 5954 RVA: 0x000421F4 File Offset: 0x000403F4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChessRogueCell(ChessRogueCell other) : this()
		{
			this.posY_ = other.posY_;
			this.isUnlocked_ = other.isUnlocked_;
			this.roomId_ = other.roomId_;
			this.blockType_ = other.blockType_;
			this.isUnlock_ = other.isUnlock_;
			this.id_ = other.id_;
			this.stageInfo_ = ((other.stageInfo_ != null) ? other.stageInfo_.Clone() : null);
			this.posX_ = other.posX_;
			this.aIBMBKDAPFK_ = other.aIBMBKDAPFK_.Clone();
			this.cellStatus_ = other.cellStatus_;
			this.markType_ = other.markType_;
			this.specialType_ = other.specialType_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x06001743 RID: 5955 RVA: 0x000422BD File Offset: 0x000404BD
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChessRogueCell Clone()
		{
			return new ChessRogueCell(this);
		}

		// Token: 0x170006C8 RID: 1736
		// (get) Token: 0x06001744 RID: 5956 RVA: 0x000422C5 File Offset: 0x000404C5
		// (set) Token: 0x06001745 RID: 5957 RVA: 0x000422CD File Offset: 0x000404CD
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint PosY
		{
			get
			{
				return this.posY_;
			}
			set
			{
				this.posY_ = value;
			}
		}

		// Token: 0x170006C9 RID: 1737
		// (get) Token: 0x06001746 RID: 5958 RVA: 0x000422D6 File Offset: 0x000404D6
		// (set) Token: 0x06001747 RID: 5959 RVA: 0x000422DE File Offset: 0x000404DE
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool IsUnlocked
		{
			get
			{
				return this.isUnlocked_;
			}
			set
			{
				this.isUnlocked_ = value;
			}
		}

		// Token: 0x170006CA RID: 1738
		// (get) Token: 0x06001748 RID: 5960 RVA: 0x000422E7 File Offset: 0x000404E7
		// (set) Token: 0x06001749 RID: 5961 RVA: 0x000422EF File Offset: 0x000404EF
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint RoomId
		{
			get
			{
				return this.roomId_;
			}
			set
			{
				this.roomId_ = value;
			}
		}

		// Token: 0x170006CB RID: 1739
		// (get) Token: 0x0600174A RID: 5962 RVA: 0x000422F8 File Offset: 0x000404F8
		// (set) Token: 0x0600174B RID: 5963 RVA: 0x00042300 File Offset: 0x00040500
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint BlockType
		{
			get
			{
				return this.blockType_;
			}
			set
			{
				this.blockType_ = value;
			}
		}

		// Token: 0x170006CC RID: 1740
		// (get) Token: 0x0600174C RID: 5964 RVA: 0x00042309 File Offset: 0x00040509
		// (set) Token: 0x0600174D RID: 5965 RVA: 0x00042311 File Offset: 0x00040511
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool IsUnlock
		{
			get
			{
				return this.isUnlock_;
			}
			set
			{
				this.isUnlock_ = value;
			}
		}

		// Token: 0x170006CD RID: 1741
		// (get) Token: 0x0600174E RID: 5966 RVA: 0x0004231A File Offset: 0x0004051A
		// (set) Token: 0x0600174F RID: 5967 RVA: 0x00042322 File Offset: 0x00040522
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Id
		{
			get
			{
				return this.id_;
			}
			set
			{
				this.id_ = value;
			}
		}

		// Token: 0x170006CE RID: 1742
		// (get) Token: 0x06001750 RID: 5968 RVA: 0x0004232B File Offset: 0x0004052B
		// (set) Token: 0x06001751 RID: 5969 RVA: 0x00042333 File Offset: 0x00040533
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public CellAdvanceInfo StageInfo
		{
			get
			{
				return this.stageInfo_;
			}
			set
			{
				this.stageInfo_ = value;
			}
		}

		// Token: 0x170006CF RID: 1743
		// (get) Token: 0x06001752 RID: 5970 RVA: 0x0004233C File Offset: 0x0004053C
		// (set) Token: 0x06001753 RID: 5971 RVA: 0x00042344 File Offset: 0x00040544
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint PosX
		{
			get
			{
				return this.posX_;
			}
			set
			{
				this.posX_ = value;
			}
		}

		// Token: 0x170006D0 RID: 1744
		// (get) Token: 0x06001754 RID: 5972 RVA: 0x0004234D File Offset: 0x0004054D
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RepeatedField<uint> AIBMBKDAPFK
		{
			get
			{
				return this.aIBMBKDAPFK_;
			}
		}

		// Token: 0x170006D1 RID: 1745
		// (get) Token: 0x06001755 RID: 5973 RVA: 0x00042355 File Offset: 0x00040555
		// (set) Token: 0x06001756 RID: 5974 RVA: 0x0004235D File Offset: 0x0004055D
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChessRogueBoardCellStatus CellStatus
		{
			get
			{
				return this.cellStatus_;
			}
			set
			{
				this.cellStatus_ = value;
			}
		}

		// Token: 0x170006D2 RID: 1746
		// (get) Token: 0x06001757 RID: 5975 RVA: 0x00042366 File Offset: 0x00040566
		// (set) Token: 0x06001758 RID: 5976 RVA: 0x0004236E File Offset: 0x0004056E
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint MarkType
		{
			get
			{
				return this.markType_;
			}
			set
			{
				this.markType_ = value;
			}
		}

		// Token: 0x170006D3 RID: 1747
		// (get) Token: 0x06001759 RID: 5977 RVA: 0x00042377 File Offset: 0x00040577
		// (set) Token: 0x0600175A RID: 5978 RVA: 0x0004237F File Offset: 0x0004057F
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChessRogueCellSpecialType SpecialType
		{
			get
			{
				return this.specialType_;
			}
			set
			{
				this.specialType_ = value;
			}
		}

		// Token: 0x0600175B RID: 5979 RVA: 0x00042388 File Offset: 0x00040588
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as ChessRogueCell);
		}

		// Token: 0x0600175C RID: 5980 RVA: 0x00042398 File Offset: 0x00040598
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(ChessRogueCell other)
		{
			return other != null && (other == this || (this.PosY == other.PosY && this.IsUnlocked == other.IsUnlocked && this.RoomId == other.RoomId && this.BlockType == other.BlockType && this.IsUnlock == other.IsUnlock && this.Id == other.Id && object.Equals(this.StageInfo, other.StageInfo) && this.PosX == other.PosX && this.aIBMBKDAPFK_.Equals(other.aIBMBKDAPFK_) && this.CellStatus == other.CellStatus && this.MarkType == other.MarkType && this.SpecialType == other.SpecialType && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x0600175D RID: 5981 RVA: 0x0004248C File Offset: 0x0004068C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.PosY != 0U)
			{
				num ^= this.PosY.GetHashCode();
			}
			if (this.IsUnlocked)
			{
				num ^= this.IsUnlocked.GetHashCode();
			}
			if (this.RoomId != 0U)
			{
				num ^= this.RoomId.GetHashCode();
			}
			if (this.BlockType != 0U)
			{
				num ^= this.BlockType.GetHashCode();
			}
			if (this.IsUnlock)
			{
				num ^= this.IsUnlock.GetHashCode();
			}
			if (this.Id != 0U)
			{
				num ^= this.Id.GetHashCode();
			}
			if (this.stageInfo_ != null)
			{
				num ^= this.StageInfo.GetHashCode();
			}
			if (this.PosX != 0U)
			{
				num ^= this.PosX.GetHashCode();
			}
			num ^= this.aIBMBKDAPFK_.GetHashCode();
			if (this.CellStatus != ChessRogueBoardCellStatus.Idle)
			{
				num ^= this.CellStatus.GetHashCode();
			}
			if (this.MarkType != 0U)
			{
				num ^= this.MarkType.GetHashCode();
			}
			if (this.SpecialType != ChessRogueCellSpecialType.None)
			{
				num ^= this.SpecialType.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x0600175E RID: 5982 RVA: 0x000425DD File Offset: 0x000407DD
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x0600175F RID: 5983 RVA: 0x000425E5 File Offset: 0x000407E5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x06001760 RID: 5984 RVA: 0x000425F0 File Offset: 0x000407F0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.RoomId != 0U)
			{
				output.WriteRawTag(8);
				output.WriteUInt32(this.RoomId);
			}
			if (this.Id != 0U)
			{
				output.WriteRawTag(16);
				output.WriteUInt32(this.Id);
			}
			if (this.PosX != 0U)
			{
				output.WriteRawTag(24);
				output.WriteUInt32(this.PosX);
			}
			if (this.PosY != 0U)
			{
				output.WriteRawTag(40);
				output.WriteUInt32(this.PosY);
			}
			if (this.BlockType != 0U)
			{
				output.WriteRawTag(48);
				output.WriteUInt32(this.BlockType);
			}
			if (this.IsUnlocked)
			{
				output.WriteRawTag(56);
				output.WriteBool(this.IsUnlocked);
			}
			if (this.IsUnlock)
			{
				output.WriteRawTag(64);
				output.WriteBool(this.IsUnlock);
			}
			if (this.stageInfo_ != null)
			{
				output.WriteRawTag(74);
				output.WriteMessage(this.StageInfo);
			}
			if (this.MarkType != 0U)
			{
				output.WriteRawTag(80);
				output.WriteUInt32(this.MarkType);
			}
			this.aIBMBKDAPFK_.WriteTo(ref output, ChessRogueCell._repeated_aIBMBKDAPFK_codec);
			if (this.SpecialType != ChessRogueCellSpecialType.None)
			{
				output.WriteRawTag(96);
				output.WriteEnum((int)this.SpecialType);
			}
			if (this.CellStatus != ChessRogueBoardCellStatus.Idle)
			{
				output.WriteRawTag(112);
				output.WriteEnum((int)this.CellStatus);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x06001761 RID: 5985 RVA: 0x00042758 File Offset: 0x00040958
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.PosY != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.PosY);
			}
			if (this.IsUnlocked)
			{
				num += 2;
			}
			if (this.RoomId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.RoomId);
			}
			if (this.BlockType != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.BlockType);
			}
			if (this.IsUnlock)
			{
				num += 2;
			}
			if (this.Id != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id);
			}
			if (this.stageInfo_ != null)
			{
				num += 1 + CodedOutputStream.ComputeMessageSize(this.StageInfo);
			}
			if (this.PosX != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.PosX);
			}
			num += this.aIBMBKDAPFK_.CalculateSize(ChessRogueCell._repeated_aIBMBKDAPFK_codec);
			if (this.CellStatus != ChessRogueBoardCellStatus.Idle)
			{
				num += 1 + CodedOutputStream.ComputeEnumSize((int)this.CellStatus);
			}
			if (this.MarkType != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.MarkType);
			}
			if (this.SpecialType != ChessRogueCellSpecialType.None)
			{
				num += 1 + CodedOutputStream.ComputeEnumSize((int)this.SpecialType);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x06001762 RID: 5986 RVA: 0x00042884 File Offset: 0x00040A84
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(ChessRogueCell other)
		{
			if (other == null)
			{
				return;
			}
			if (other.PosY != 0U)
			{
				this.PosY = other.PosY;
			}
			if (other.IsUnlocked)
			{
				this.IsUnlocked = other.IsUnlocked;
			}
			if (other.RoomId != 0U)
			{
				this.RoomId = other.RoomId;
			}
			if (other.BlockType != 0U)
			{
				this.BlockType = other.BlockType;
			}
			if (other.IsUnlock)
			{
				this.IsUnlock = other.IsUnlock;
			}
			if (other.Id != 0U)
			{
				this.Id = other.Id;
			}
			if (other.stageInfo_ != null)
			{
				if (this.stageInfo_ == null)
				{
					this.StageInfo = new CellAdvanceInfo();
				}
				this.StageInfo.MergeFrom(other.StageInfo);
			}
			if (other.PosX != 0U)
			{
				this.PosX = other.PosX;
			}
			this.aIBMBKDAPFK_.Add(other.aIBMBKDAPFK_);
			if (other.CellStatus != ChessRogueBoardCellStatus.Idle)
			{
				this.CellStatus = other.CellStatus;
			}
			if (other.MarkType != 0U)
			{
				this.MarkType = other.MarkType;
			}
			if (other.SpecialType != ChessRogueCellSpecialType.None)
			{
				this.SpecialType = other.SpecialType;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x06001763 RID: 5987 RVA: 0x000429B1 File Offset: 0x00040BB1
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x06001764 RID: 5988 RVA: 0x000429BC File Offset: 0x00040BBC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num <= 56U)
				{
					if (num <= 24U)
					{
						if (num == 8U)
						{
							this.RoomId = input.ReadUInt32();
							continue;
						}
						if (num == 16U)
						{
							this.Id = input.ReadUInt32();
							continue;
						}
						if (num == 24U)
						{
							this.PosX = input.ReadUInt32();
							continue;
						}
					}
					else
					{
						if (num == 40U)
						{
							this.PosY = input.ReadUInt32();
							continue;
						}
						if (num == 48U)
						{
							this.BlockType = input.ReadUInt32();
							continue;
						}
						if (num == 56U)
						{
							this.IsUnlocked = input.ReadBool();
							continue;
						}
					}
				}
				else if (num <= 80U)
				{
					if (num == 64U)
					{
						this.IsUnlock = input.ReadBool();
						continue;
					}
					if (num == 74U)
					{
						if (this.stageInfo_ == null)
						{
							this.StageInfo = new CellAdvanceInfo();
						}
						input.ReadMessage(this.StageInfo);
						continue;
					}
					if (num == 80U)
					{
						this.MarkType = input.ReadUInt32();
						continue;
					}
				}
				else if (num <= 90U)
				{
					if (num == 88U || num == 90U)
					{
						this.aIBMBKDAPFK_.AddEntriesFrom(ref input, ChessRogueCell._repeated_aIBMBKDAPFK_codec);
						continue;
					}
				}
				else
				{
					if (num == 96U)
					{
						this.SpecialType = (ChessRogueCellSpecialType)input.ReadEnum();
						continue;
					}
					if (num == 112U)
					{
						this.CellStatus = (ChessRogueBoardCellStatus)input.ReadEnum();
						continue;
					}
				}
				this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
			}
		}

		// Token: 0x04000998 RID: 2456
		private static readonly MessageParser<ChessRogueCell> _parser = new MessageParser<ChessRogueCell>(() => new ChessRogueCell());

		// Token: 0x04000999 RID: 2457
		private UnknownFieldSet _unknownFields;

		// Token: 0x0400099A RID: 2458
		public const int PosYFieldNumber = 5;

		// Token: 0x0400099B RID: 2459
		private uint posY_;

		// Token: 0x0400099C RID: 2460
		public const int IsUnlockedFieldNumber = 7;

		// Token: 0x0400099D RID: 2461
		private bool isUnlocked_;

		// Token: 0x0400099E RID: 2462
		public const int RoomIdFieldNumber = 1;

		// Token: 0x0400099F RID: 2463
		private uint roomId_;

		// Token: 0x040009A0 RID: 2464
		public const int BlockTypeFieldNumber = 6;

		// Token: 0x040009A1 RID: 2465
		private uint blockType_;

		// Token: 0x040009A2 RID: 2466
		public const int IsUnlockFieldNumber = 8;

		// Token: 0x040009A3 RID: 2467
		private bool isUnlock_;

		// Token: 0x040009A4 RID: 2468
		public const int IdFieldNumber = 2;

		// Token: 0x040009A5 RID: 2469
		private uint id_;

		// Token: 0x040009A6 RID: 2470
		public const int StageInfoFieldNumber = 9;

		// Token: 0x040009A7 RID: 2471
		private CellAdvanceInfo stageInfo_;

		// Token: 0x040009A8 RID: 2472
		public const int PosXFieldNumber = 3;

		// Token: 0x040009A9 RID: 2473
		private uint posX_;

		// Token: 0x040009AA RID: 2474
		public const int AIBMBKDAPFKFieldNumber = 11;

		// Token: 0x040009AB RID: 2475
		private static readonly FieldCodec<uint> _repeated_aIBMBKDAPFK_codec = FieldCodec.ForUInt32(90U);

		// Token: 0x040009AC RID: 2476
		private readonly RepeatedField<uint> aIBMBKDAPFK_ = new RepeatedField<uint>();

		// Token: 0x040009AD RID: 2477
		public const int CellStatusFieldNumber = 14;

		// Token: 0x040009AE RID: 2478
		private ChessRogueBoardCellStatus cellStatus_;

		// Token: 0x040009AF RID: 2479
		public const int MarkTypeFieldNumber = 10;

		// Token: 0x040009B0 RID: 2480
		private uint markType_;

		// Token: 0x040009B1 RID: 2481
		public const int SpecialTypeFieldNumber = 12;

		// Token: 0x040009B2 RID: 2482
		private ChessRogueCellSpecialType specialType_;
	}
}
